home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
program
/
fpk65_66.zip
/
SOURCE
/
RTL
/
DOS
/
SYSTEMH.INC
< prev
next >
Wrap
Text File
|
1997-02-11
|
7KB
|
198 lines
{****************************************************************************
Copyright (c) 1993,1997 by
Florian Klämpfl & Michael Spiegel
****************************************************************************}
{ diese Datei enthaelt die betriebssystemunabhaengigen Deklarationen der }
{ Unit System }
type
shortint = -128..127;
{ longint ist in TP als -2147483648..2147483647 deklariert, }
{ aber dies kann in dieser PP-Version nicht ueberstzt werden, }
{ werden, da der Compiler erst 2147483648 versucht in eine }
{ Int-Konstante umzuwandeln, um dann diese Zahl spaeter zu }
{ negieren, aber da macht VAL natürlich nicht mit }
{ also Zweierkomplementdarstellung: }
longint = $80000000..$7fffffff;
integer = -32768..32767;
byte = 0..255;
word = 0..65535;
const
{ max. Werte für longint und int }
maxlongint = $7fffffff;
maxint = 32767;
type
{ Turbo Pascal Fließkommatypen wenigstens deklarieren: }
extended = real;
double = real;
single = real;
{ Nullterminierte Strings }
pchar = ^char;
const
{ Kompatibilität zu TP }
test8086 : byte = 2; { immer i386 oder neuer }
test8087 : byte = 3; { immer 387 oder höher; notfalls emuliert }
var
{ Standartein- und ausgabe }
output,input : text;
exitproc : pointer;
inoutres : word;
procedure runerror(w : word);
procedure move(var source,dest;count : longint);
procedure fillchar(var x;count : longint;value : char);
procedure fillchar(var x;count : longint;value : byte);
procedure fillword(var x;count : longint;value : word);
function lo(w : word) : byte;
function hi(w : word) : byte;
function lo(i : integer) : byte;
function hi(i : integer) : byte;
function lo(l : longint) : word;
function hi(l : longint) : word;
function ord(c : char) : byte;
function ord(b : boolean) : byte;
function chr(b : byte) : char;
function length(s : string) : byte;
procedure str(l : longint;var s : string);
procedure str(d : double;var s : string);
procedure str(i : integer;var s : string);
procedure str(si : shortint;var s : string);
procedure str(b : byte;var s : string);
procedure str(w : word;var s : string);
procedure val(const s : string;var v : longint;var code : word);
procedure val(const s : string;var v : longint);
procedure val(const s : string;var b : byte);
procedure val(const s : string;var b : byte;var code : word);
procedure val(const s : string;var d : double;var code : word);
procedure inc(var i : longint);
procedure inc(var i : integer);
procedure inc(var i : word);
procedure inc(var i : shortint);
procedure inc(var i : byte);
procedure dec(var i : longint);
procedure dec(var i : integer);
procedure dec(var i : word);
procedure dec(var i : shortint);
procedure dec(var i : byte);
procedure dec(var i : longint;a : longint);
procedure inc(var i : longint;a : longint);
procedure dec(var i : word;a : longint);
procedure inc(var i : word;a : longint);
procedure dec(var i : integer;a : longint);
procedure inc(var i : integer;a : longint);
procedure dec(var i : byte;a : longint);
procedure inc(var i : byte;a : longint);
procedure dec(var i : shortint;a : longint);
procedure inc(var i : shortint;a : longint);
function random(l : longint) : longint;
procedure halt;
procedure halt(errnum : byte);
procedure randomize;
function paramcount : longint;
function paramstr(l : longint) : string;
{ Speicherverwaltung }
procedure getmem(var p : pointer;size : longint);
procedure freemem(var p : pointer;size : longint);
function memavail : longint;
function maxavail : longint;
{ Dateiverwaltung }
procedure assign(var f : file;const name : string);
procedure rewrite(var f : file;l : word);
procedure rewrite(var f : file);
procedure reset(var f : file;l : word);
procedure reset(var f : file);
procedure append(var t : text);
procedure blockwrite(var f : file;var buf;count : longint);
procedure blockread(var f : file;var buf;count : longint);
procedure blockread(var f : file;var buf;count : longint;var result : longint);
procedure blockread(var f : file;var buf;count : word;var result : word);
procedure close(var f : file);
function filepos(var f : file) : longint;
function filesize(var f : file) : longint;
procedure seek(var f : file;pos : longint);
procedure erase(var f : file);
procedure rename(var f : file;const s : string);
function eof(var f : file) : boolean;
procedure assign(var t : text;const s : string);
procedure rewrite(var t : text);
procedure reset(var t : text);
procedure close(var t : text);
function eof(var t : text) : boolean;
function eof : boolean;
function eoln(var t : text) : boolean;
function eoln : boolean;
procedure flush(var t : text);
procedure erase(var t : text);
procedure rename(var t : text;const s : string);
function ioresult : word;
procedure chdir(const s : string);
procedure mkdir(const s : string);
procedure rmdir(const s : string);
procedure getdir(drivenr : byte;var dir : string);
{ math. Routinen }
function abs(l : longint) : longint;
function sqr(l : longint) : longint;
function odd(l : longint) : boolean;
function ptr(sel,off : word) : pointer;
{ real. Matheroutinen }
{$I MATHH.INC}
{ Stringbehandlung }
function copy(const s : string;index : integer;count : byte) : string;
procedure delete(var s : string;index : integer;count : integer);
procedure insert(const source : string;var s : string;index : integer);
function pos(const substr : string;const s : string) : byte;
function upcase(c : char) : char;
function upcase(const s : string) : string;
function lowercase(c : char) : char;
function lowercase(const s : string) : string;
function space(b : byte) : string;
const
fmclosed = $D7B0;
fminput = $D7B1;
fmoutput = $D7B2;
fminout = $D7B3;
fmappend = $D7B4;
filemode : byte = 2;
{ old version doesn't like this }
{$ifndef VER0_6_5}
{$ifndef VER0_6_4}
type
tobject = class
constructor create;
destructor free;virtual;
end;
{$endif}
{$endif}